{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<script type="text/javascript">
	$(document).ready(function(){
		load_row();
		$("select[name='send_type']").bind("change",function(){load_row();});
	});
function load_row()
{
	var send_type = $("select[name='send_type']").val();
	$("#user_group_row").hide();
	$("#user_id_row").hide();
	$("#no_user_row").hide();
	switch(send_type)
	{
		case '0':
			$("#user_group_row").show();
			break;
		case '1':
			$("#user_id_row").show();
			break;
		case '2':
			$("#no_user_row").show();
			break;
	}
}
</script>
<div class="main">
<div class="main_title">{%SEND_VOUCHER} <a href="{:u("EcvType/index")}" class="back_list">{%BACK_LIST}</a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">{%VOUCHER_SEND_TYPE}:</td>
		<td class="item_input">
			<select name="send_type">
				<option value="0">{%VOUCHER_SEND_TYPE_0}</option>
				<option value="1">{%VOUCHER_SEND_TYPE_1}</option>
				<option value="2">{%VOUCHER_SEND_TYPE_2}</option>
			</select>
		</td>
	</tr>
	<tr id="user_group_row">
		<td class="item_title">{%USER_GROUP}:</td>
		<td class="item_input">
			<select name="user_group">
				<foreach name="user_group" item="group_item">
				<option value="{$group_item.id}">{$group_item.name}</option>
				</foreach>
			</select>
		</td>
	</tr>
	<tr id="user_id_row" style="display:none;">
		<td class="item_title">{%USER_ID}:</td>
		<td class="item_input">
			<input type="text" class="textbox" name="user_id" /> <span class="tip_span">{%VOUCHER_SEND_USER_ID_TIP}</span> 
		</td>
	</tr>
	<tr id="no_user_row" style="display:none;">
		<td class="item_title">{%VOUCHER_NEED_GEN_COUNT}:</td>
		<td class="item_input"><input type="text" class="textbox" name="gen_count" /></td>
	</tr>
	<tr>
		<td class="item_title">{%IS_NEED_PASSWORD}:</td>
		<td class="item_input">
			<select name="need_password">
				<option value="0">{%NEED_PWD_0}</option>
				<option value="1">{%NEED_PWD_1}</option>
			</select>
		</td>
	</tr>
	
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="ecv_type_id" value="{$ecv_type.id}" />
			<input type="hidden" name="{:conf("VAR_MODULE")}" value="EcvType" />
			<input type="hidden" name="{:conf("VAR_ACTION")}" value="doSend" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="{%SEND_VOUCHER}" />
			<input type="reset" class="button" value="{%RESET}" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>	 
</form>
</div>
<include file="Public:footer" />